/*
 * {comment of class}
 *
 * @author (C) <a href="http://www.carfield.com.hk">Carfield Yim</a>, 2005
 */
package hk.com.carfield.action.process;

import hk.com.carfield.core.Context;
import hk.com.carfield.web.Request;

import java.io.File;

public final class Trash implements Process {
	public String actionCode() {
		return "trash";
	}

	public boolean adminOnly() {
		return true;
	}

	public File process(final Context c, final Request req, final File l) {
		final File parent = l.getParentFile();
		l.renameTo(new File(c.config.getCacheDir(), l.getName()));
		return parent;
	}
}